﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Maxleaf.EDI.Domain
{
    public interface IRepository<TEntity>
    {
        IQueryable<TEntity> GetAll(IUnitOfWork unitOfWork);

        TEntity GetSingleOrDefault(IUnitOfWork unitOfWork, Expression<Func<TEntity, bool>> predicate);

        void Add(IUnitOfWork unitOfWork, TEntity aggregateRoot);

        void Update(IUnitOfWork unitOfWork, TEntity aggregateRoot);

        void Delete(IUnitOfWork unitOfWork, TEntity aggregateRoot);
    }
}
